from fabric import Connection
con = Connection('192.168.56.102', port=2022, user='root', connect_kwargs={'password':'ipcun'})
con.run('apk add linux-headers musl-dev gcc g++ make mysql-dev linux-headers libffi-dev openssl-dev git')
con.run('apk add python2 python2-dev py2-pip')
con.run('pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com --upgrade pip')
with con.cd('/root/pox'):
     con.run('git clone http://github.com/noxrepo/pox')
with con.cd('/root/pox/ext'):
#     con.run('git clone https://github.com/MurphyMc/poxdesk')
     con.run('git clone https://gitee.com/ipcun/poxdesk')
with con.cd('/root/pox/ext/poxdesk'):
#     con.run('wget http://downloads.sourceforge.net/qooxdoo/qooxdoo-2.0.2-sdk.zip')
	 con.run('unzip qooxdoo-2.0.2-sdk.zip')
     con.run('mv qooxdoo-2.0.2-sdk qx')
     con.run('./generate.py')
with con.cd('/root/pox'):
     con.run('./pox.py samples.pretty_log web messenger messenger.log_service messenger.ajax_transport openflow.of_service poxdesk')